import $http from '../../../servers/http';
import { Result } from '../../schema/Result';
/* 流程调试记录管理
---------------------------------------------------------------- */
import {
  FlowDebugRecordInfo,
  FlowDebugRecordInfoResponse,
  FlowDebugRecordListParams,
} from '../../schema/FlowDebugRecord';

/**删除流程调试记录 */
export const deleteFlowDebugRecord = (id: string): Promise<Result<null>> => {
  return $http.delete({
    url: `/robotmanage/flowdebugrecords/${id}`,
  });
};

/**查询流程调试记录列表 */
export const getFlowDebugRecordList = (
  data: FlowDebugRecordListParams
): Promise<Result<FlowDebugRecordInfo[]>> => {
  return $http.get({
    url: '/robotmanage/flowdebugrecords',
    data,
  });
};

/**查询流程调试记录详情 */
export const getFlowDebugRecordInfo = (
  id: string
): Promise<Result<FlowDebugRecordInfoResponse>> => {
  return $http.get({
    url: `/robotmanage/flowdebugrecords/${id}/details`,
  });
};
